import request from '@/utils/request'

// 查询获取新包列表
export function listBuilds(query) {
  return request({
    url: '/publish/builds/list',
    method: 'get',
    params: query
  })
}

export function downloadJar(id) {
  return request({
    url: '/publish/builds/download/jar/'+id,
    method: 'get',
  })
}

// 查询获取新包详细
export function getBuilds(id) {
  return request({
    url: '/publish/builds/' + id,
    method: 'get'
  })
}

// 新增获取新包
export function addBuilds(data) {
  return request({
    url: '/publish/builds',
    method: 'post',
    data: data
  })
}

// 修改获取新包
export function updateBuilds(data) {
  return request({
    url: '/publish/builds',
    method: 'put',
    data: data
  })
}

// 删除获取新包
export function delBuilds(id) {
  return request({
    url: '/publish/builds/' + id,
    method: 'delete'
  })
}
